﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace Cashier.prints
{
    public class StringFormatStyle
    {
        private StringFormat stringFormat = new StringFormat();

        /// <summary>
        /// 水平居左，垂直居中
        /// </summary>
        public StringFormat LeftMiddle
        {
            get 
            { 
                stringFormat.Alignment = StringAlignment.Near;
                stringFormat.LineAlignment = StringAlignment.Center;
                return stringFormat;
            }
        }

        /// <summary>
        /// 水平居中，垂直居中
        /// </summary>
        public StringFormat CenterMiddle
        {
            get
            {
                stringFormat.Alignment = StringAlignment.Center;
                stringFormat.LineAlignment = StringAlignment.Center;
                return stringFormat;
            }
        }

        /// <summary>
        /// 水平居右，垂直居中
        /// </summary>
        public StringFormat RightMiddle
        {
            get
            {
                stringFormat.Alignment = StringAlignment.Far;
                stringFormat.LineAlignment = StringAlignment.Center;
                return stringFormat;
            }
        }
    }
}
